﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InsuranceSell.Code.Entities;
using InsuranceSell.Code.Data;
using System.Data;

namespace InsuranceSell.Code.Services
{
    public static class CustomerServices
    {
        public static bool AddNewCustomer(Customer customer)
        {
            CustomerDAO customberDAO = new CustomerDAO();
            return customberDAO.AddNewCustomer(customer);
        }

        public static DataTable LoadAllCustomer()
        {
            CustomerDAO customerDAO = new CustomerDAO();
            return customerDAO.LoadAllCustomer();
        }
        public static DataTable Load50NewCustomer() 
        {
            CustomerDAO customerDAO = new CustomerDAO();
            return customerDAO.Load50NewCustomer();
        }
        public static bool UpdateCustomer(Customer customer) {
            CustomerDAO customerDAO = new CustomerDAO();
            return customerDAO.UpdateCustomer(customer);
        }
        public static bool DeleteCustomer(string ContractNo) {
            CustomerDAO customerDAO =new CustomerDAO();
            return customerDAO.DeleteCustomer(ContractNo);
        }
        public static DataTable FindContractNo(string ContractNo) {
            CustomerDAO customerDAO = new CustomerDAO();
            return customerDAO.FindContractNo(ContractNo);
        }
    }
}
